<!DOCTYPE html>
<html lang="en">
<title>jQuery</title>
<head>
    <script src="/jquery-3.2.1.js"></script>
    <script type="text/javascript">
        $(document).ready(function(){
            $("button").click(function(){
                $("div").slideToggle("slow");
            });
        });
    </script>


</head>
<body>
<div style="color: antiquewhite; width: 100px; height: 100px">
    <p>这是一个小例子</p>
</div>
<button>切换</button>
</body>
</html>